﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace WebApplication1.Models
{
    public class Product
    {
        public int ProductId { get; set; }
        [Required(ErrorMessage ="请输入商品标题")]
        [StringLength(20,ErrorMessage ="商品标题不能超过20个字")]
        public string Title { get; set; }
        public int? CateId { get; set; }
        [Required(ErrorMessage ="请输入商品价格")]
        [Range(0.01,100000,ErrorMessage ="商品价格的范围应该在0.01到100000")]
        public decimal Price { get; set; }
    }
}